<?php

namespace App\Models\Posts;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

class WxPostsVideo extends Model
{
	use HasDateTimeFormatter;
    use SoftDeletes;

    protected $appends = ['show_type'];

    protected $table = 'wx_posts_video';


    public function getShowTypeAttribute($key)
    {
        if ($this->video_height > $this->video_width){
            return 0;// 竖屏显示
        }else{
            return 1;// 横屏显示
        }

    }

}
